package com.starlink.model.util;

import com.starlink.model.dtomapper.StarHealthDtoMapper;
import com.starlink.model.domain.StarHealthDO;
import com.starlink.model.vo.StarHealthVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class StarHealthConvert {

    public static List<StarHealthVO> buildStarHealthVoList(List<StarHealthDO> starHealthDOList) {
        if (CollectionUtils.isEmpty(starHealthDOList)) {
            return Lists.newArrayList();
        }
        List<StarHealthVO> starHealthVOList = new ArrayList<>();
        for (StarHealthDO starHealthDO : starHealthDOList) {
            starHealthVOList.add(StarHealthDtoMapper.INSTANCE.do2VO(starHealthDO));
        }

        return starHealthVOList;
    }
}
